home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Developer Tools / MPW Libraries Support / Interfaces / ASLMCLibs.h next >
Encoding:
Text File  |  1996-11-19  |  1.3 KB  |  67 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ASLMCLibs.h
  3.  
  4.     Contains:    Stdio equates for ASLM Libraries
  5.  
  6.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10. //
  11. // WARNING: This file should only be included by a library that is using
  12. //            MPWCallbacks.cl.o or MPWLibs.cl.o
  13. //            This must be included before other include files to make sure
  14. //            that the reassignments take place
  15. //
  16. #ifndef __ASLMCLIBS__
  17. #define __ASLMCLIBS__
  18.  
  19. #ifndef __LIBRARYMANAGER__
  20. #include <LibraryManager.h>
  21. #endif
  22. #ifndef __STDIO__
  23. #include <stdio.h>
  24. #endif
  25. //
  26. // Get rid of the declaration of errno so it doesn't conflict with
  27. // our #define below
  28. //
  29. #define errno    localErrno
  30. #ifndef __ERRNO__
  31. #include <errno.h>
  32. #endif
  33. //
  34. // Get rid of the declaration of MacOSErr so it doesn't conflict with
  35. // our #define below
  36. //
  37. #define MacOSErr    localMacOSErr
  38. #ifndef __ERRORS__
  39. #include <Errors.h>
  40. #endif
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46. extern int*            GetClientErrno(void);
  47. extern short*        GetClientMacOSErr(void);
  48. extern FILE*        GetStdIOFile(int);
  49.  
  50. #ifdef __cplusplus
  51. };
  52. #endif
  53.  
  54. #undef stdin
  55. #undef stdout
  56. #undef stderr
  57. #define stdin        GetStdIOFile(0)
  58. #define stdout        GetStdIOFile(1)
  59. #define stderr        GetStdIOFile(2)
  60.  
  61. #undef errno
  62. #undef MacOSErr
  63. #define errno        (*GetClientErrno())
  64. #define MacOSErr    (*GetClientMacOSErr())
  65.  
  66. #endif
  67.